package com.cakebackoffice.database;


public class ProductTable extends DatabaseTable {
    public static final String TABLESNAME = "ProductTable";
    public static final String ID = "_id";
    public static final String REMOTE_ID = "remoteId";
    public static final String COMMENTS = "comments";
    public static final String ID_STATUS = "status";
    public static final String ID_PRODUCTTYPE = "idProductType";
    public static final String ID_MENU = "menu";
    public static final String ID_STORAGE = "idStorage";


    public static final String[] ALLFIELDS = new String[]{
            ID,
            REMOTE_ID,
            COMMENTS,
            ID_STATUS,
            ID_PRODUCTTYPE,
            ID_MENU,
            ID_STORAGE

    };

    public static final String CREATE = "CREATE TABLE " + TABLESNAME
            + " ( "
            + ID + " INTEGER PRIMARY KEY AUTOINCREMENT , "
            + REMOTE_ID + " INTEGER ,"
            + COMMENTS + " TEXT , "
            + ID_STATUS + " INTEGER , "
            + ID_PRODUCTTYPE + " INTEGER , "
            + ID_MENU + " INTEGER , "
            + ID_STORAGE + " INTEGER ); ";


    private static DatabaseTable ourInstance = new ProductTable();


    @Override
    public String getTableName() {
        return TABLESNAME;
    }

    @Override
    public String[] getAllFields() {
        return ALLFIELDS;
    }

    @Override
    public String getCreate() {
        return CREATE;
    }

    public static DatabaseTable getInstance() {
        return ourInstance;
    }

    private ProductTable() {
    }
}
